<#if formField.hidden?? && formField.hidden=="1">
	<!-- 隐藏 -->
	<input type=hidden name="fieldMap['${field.name}'].id"  <#if businessInstanceField?? && businessInstanceField.id??>value="${businessInstanceField.id}"</#if>>
	<input type=hidden name="fieldMap['${field.name}'].field.id"  value="${formField.field.id}">
	<input type=hidden id=${field.name} name="fieldMap['${field.name}'].value" <#if businessInstanceField??>value="${businessInstanceField.value?default('')}" </#if>></input>
<#else>
	<#if formField.readonly?? && formField.readonly=="1">
		<#if linkOpter??>${linkOpter}</#if>
	<#else>
		<input type=hidden name="fieldMap['${field.name}'].id"  <#if businessInstanceField?? && businessInstanceField.id??>value="${businessInstanceField.id}"</#if>>
		<input type=hidden name="fieldMap['${field.name}'].field.id"  value="${formField.field.id}">
		<input type="hidden" id="${field.name}" name="fieldMap['${field.name}'].entityId"  <#if businessInstanceField?? && businessInstanceField.entityId??>value="${businessInstanceField.entityId}" </#if> > </input>
		
		<input type="text" readonly="readonly" id="${field.name}Id" datarule="string" datarulejson='{"dataType":"string","isRequired":"1","description":"字符串长度小于等于200字符","length":"200","displayName":"所属电厂"}'
			name="${field.name}Names" class="textTest"  <#if disPlayName??>value="${disPlayName}" </#if>> 
	</#if>

	<script language="JavaScript">
	$(document).ready(function(){
		 $(document.getElementById('${field.name}Id')).inputStyle({
			operatorType:"text",
			operatorText:"选择",
			controllerWidth:'${formField.width?default('200')}',
			operatorFun:showMenu${field.id}
		});
	});
	
	function viewFactory(id,title) {
		var url =TDQS.CONTEXT_PATH+"business/process?tdqssid="+TDQS.SESSION_ID+"&function.id=foundation_power_fac_function_11";
		url+="&businessProcess.id=foundation_power_factory_0000001";
		url+="&businessInstance.id="+id+'&isHideButton=1';
	     if(window.parent.curWin == null){
			new Win({
				url:url,
				title:title,
				width:980,
				height:500,
				center:true,
				resizable:false
			});
		}else{
			window.parent.curWin.options.url =url ;
			window.parent.curWin.options.title =title;
			window.parent.curWin.setUrl(url);
			window.parent.curWin.setTitle(title);
		}
	}
	
	function showMenu${field.id}(){
		var id = $('#${field.name}').val();
		new Win({
			url:TDQS.CONTEXT_PATH+"foundation/showPowerFactory?powerFactoryId="+id+'&saveFunction=save${field.id}&cleanFunction=clean${field.id}',
			title:"电厂",
			width:550,
			height:320,
			center:true,
			resizable:false
		});
	}
	
	function save${field.id}(rec){		
		$('#${field.name}Id').val(rec.powerInfo.name);
		$('#${field.name}').val(rec.id);
		window.curWin.saveWin();
	}
	
	function clean${field.id}(){		
		$('#${field.name}Id').val("");
		$('#${field.name}').val("");
	
		window.curWin.saveWin();
	}
	</script>
</#if>